<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<?php 
	require_once ".\system\dbConn.php";
	$id=$_GET["id"];
	$name=$_GET["aname"];
	session_start();//开启session
	$uploadusers=$_SESSION["username"];
	$sql="update demand set isaccept=1 where id = '$id'";
	$result=mysqli_query($link,$sql);

	$sql1="insert into accepter value(null,'$name','$uploadusers')";
	$result1=mysqli_query($link,$sql1);

	if ($result1==1) {
          header("location:list.php");
    }
    else{
          echo "报名失败";
          header("location:list.php");
        }
	 ?>
	
</body>
</html>